import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import store  from "./store";
import { Provider } from "react-redux";

const root = ReactDOM.createRoot(document.getElementById("root"));

root.render(
    <Provider store={store}>
      <App />
      </Provider>
);

//6.监听状态管理器，全局数据发生变化直接重新渲染
// store.subscribe(() => {  //订阅状态管理器
//   root.render(
//       <App />
//   );
// })
